home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / syslogd.z / syslogd
Encoding:
Text File  |  2002-10-03  |  14.6 KB  |  331 lines

  1.  
  2.  
  3.  
  4. ssssyyyyssssllllooooggggdddd((((1111MMMM))))                                                        ssssyyyyssssllllooooggggdddd((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      syslogd - log systems messages
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////ssssyyyyssssllllooooggggdddd [ ----ffff_c_o_n_f_i_g_f_i_l_e ] [ ----mmmm_m_a_r_k_i_n_t_e_r_v_a_l ] [ ----pppp_l_o_g_p_i_p_e ]
  13.                             [ ----dddd ] [ ----aaaa _m_a_s_k,_m_a_t_c_h | ----aaaa _m_a_t_c_h ] [----AAAA]
  14.                       [ ----PPPP port_number | ----NNNN ]
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _s_y_s_l_o_g_d reads and logs messages into a set of files described by the
  18.      configuration file /_e_t_c/_s_y_s_l_o_g._c_o_n_f.  Each message is one line.  A
  19.      message can contain a priority code, marked by a number in angle braces
  20.      at the beginning of the line.  Priorities are defined in <_s_y_s/_s_y_s_l_o_g._h>.
  21.      _s_y_s_l_o_g_d reads from the stream device /_d_e_v/_l_o_g, from an Internet domain
  22.      socket specified in /_e_t_c/_s_e_r_v_i_c_e_s, and from the special device /_d_e_v/_k_l_o_g
  23.      (to read kernel messages).
  24.  
  25.      _s_y_s_l_o_g_d reads its configuration when it starts up and whenever it
  26.      receives a hangup signal.  Lines in the configuration file have a
  27.      selector to determine the message priorities to which the line applies
  28.      and an _a_c_t_i_o_n.  The _a_c_t_i_o_n fields are separated from the selector by one
  29.      or more tabs.  A maximum of 50 lines can be specified.  It is recommended
  30.      that no more than 49 be used, or the LLLLOOOOGGGG____LLLLFFFFMMMMTTTT facility may not work
  31.      correctly; this facility is used by _l_o_g_i_n(1), among other programs.
  32.  
  33.      Selectors are semicolon separated lists of priority specifiers.  Each
  34.      priority has a _f_a_c_i_l_i_t_y describing the part of the system that generated
  35.      the message, a dot, and a _l_e_v_e_l indicating the severity of the message.
  36.      Symbolic names can be used.  An asterisk (****) selects all facilities,
  37.      while ddddeeeebbbbuuuugggg selects all levels.  All messages of the specified level or
  38.      higher (greater severity) are selected.  More than one facility can be
  39.      selected, using commas to separate them.  For example:
  40.  
  41.           *.emerg;mail,daemon.crit
  42.  
  43.      selects all facilities at the _e_m_e_r_g level and the _m_a_i_l and _d_a_e_m_o_n
  44.      facilities at the _c_r_i_t level.
  45.  
  46.      Known facilities and levels recognized by _s_y_s_l_o_g_d are those listed in
  47.      _s_y_s_l_o_g(3C) without the leading LLLLOOOOGGGG____.  The additional facility mmmmaaaarrrrkkkk logs
  48.      messages at priority LOG_INFO every 20 minutes (this interval can be
  49.      changed with the ----mmmm flag).  The mmmmaaaarrrrkkkk facility is not enabled by a
  50.      facility field containing an asterisk.  The level nnnnoooonnnneeee can be used to
  51.      disable a particular facility.  For example:
  52.  
  53.           *.debug;mail.none
  54.  
  55.      sends all messages _e_x_c_e_p_t mail messages to the selected file.
  56.  
  57.      The second part of each line describes where the message is to be logged
  58.      if this line is selected.  There are five forms:
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssyyyyssssllllooooggggdddd((((1111MMMM))))                                                        ssssyyyyssssllllooooggggdddd((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      +o  A filename (beginning with a leading slash).  The file is opened in
  75.         append mode.
  76.  
  77.      +o  A hostname preceded by an at sign (@@@@).  Selected messages are
  78.         forwarded to the _s_y_s_l_o_g_d on the named host.
  79.  
  80.      +o  A comma-separated list of users.  Selected messages are written to
  81.         those users if they are logged in.
  82.  
  83.      +o  An asterisk.  Selected messages are written to all logged-in users.
  84.  
  85.      +o  A ||||, followed immediately by a program name, which is taken to be all
  86.         chars after the |||| up to the next tab; at least one action must follow
  87.         the tab.  The filter is expected to read stdin and write the filtered
  88.         response to stdout.  The filter receives the source and message
  89.         through stdin.  A filter can also access the priority, facility, and
  90.         hostname via environmental variables: PRIORITY, FACILITY, and FROM.
  91.         The values are stored as strings defined in <_s_y_s/_s_y_s_l_o_g._h>.  If the
  92.         filter exits with a non-zero value, the original message is logged, as
  93.         well as a message that the filter failed.  The filter has a limited
  94.         time (currently eight seconds) to process the message.  If the filter
  95.         exits with status 0 without writing any data, no message is logged.
  96.         The data to be read by the filter is not terminated with a newline,
  97.         nor should the data written have a newline appended.  See below for a
  98.         sample filter.
  99.  
  100.      Blank lines and lines beginning with #### are ignored.
  101.  
  102.      For example, the configuration file:
  103.  
  104.           kern.debug  |/usr/sbin/klogpp          /var/adm/SYSLOG
  105.           kern.debug  |/usr/sbin/klogpp          /dev/console
  106.           user,mail,daemon,auth,syslog,lpr.debug /var/adm/SYSLOG
  107.           kern.err    @ginger
  108.           *.emerg     *
  109.           *.alert     eric,beth
  110.           *.alert;auth.warning                   ralph
  111.  
  112.      filters all kernel messages through _k_l_o_g_p_p(1M) and writes them to the
  113.      system console and into /_v_a_r/_a_d_m/_S_Y_S_L_O_G and logs debug (or higher) level
  114.      messages into the file /_v_a_r/_a_d_m/_S_Y_S_L_O_G.  Kernel messages of error
  115.      severity or higher are forwarded to ggggiiiinnnnggggeeeerrrr.  All users are informed of
  116.      any emergency messages.  The users eeeerrrriiiicccc and bbbbeeeetttthhhh are informed of any
  117.      alert messages.  The user rrrraaaallllpppphhhh is informed of any alert message or any
  118.      warning message (or higher) from the authorization system.
  119.  
  120.      _s_y_s_l_o_g_d is started at system initialization from /_e_t_c/_i_n_i_t._d/_s_y_s_e_t_u_p.
  121.      Optional site-specific flags belong in /_e_t_c/_c_o_n_f_i_g/_s_y_s_l_o_g_d._o_p_t_i_o_n_s.  The
  122.      flags are:
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ssssyyyyssssllllooooggggdddd((((1111MMMM))))                                                        ssssyyyyssssllllooooggggdddd((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      ----ffff_c_o_n_f_i_g_f_i_l_e     Specify an alternate configuration file.
  141.  
  142.      ----mmmm_m_a_r_k_i_n_t_e_r_v_a_l   Select the number of minutes between mark messages.
  143.  
  144.      ----dddd               Turn on debugging.  _s_y_s_l_o_g_d runs in the foreground and
  145.                       writes debugging information to stdout.
  146.  
  147.      ----pppp_l_o_g_p_i_p_e        Use the given name for the device instead of /_d_e_v/_l_o_g.
  148.  
  149.      ----aaaa _m_a_s_k,_m_a_t_c_h
  150.      ----aaaa _m_a_t_c_h         This option permits restriction of most of the portmap
  151.                       services to a subset of hosts or networks.  (The portmap
  152.                       null procedure is not restricted.)  The _m_a_s_k, and _m_a_t_c_h
  153.                       arguments are IP addresses in Internet dot notation (see
  154.                       _i_n_e_t(3N)) that represent masks, hosts or networks.  The
  155.                       _m_a_s_k and _m_a_t_c_h arguments must be separated by a comma
  156.                       with no intervening whitespace.  If _m_a_s_k and the comma
  157.                       are missing, the argument is interpreted as a Class A,
  158.                       B, or C network number and the mask is set to the value
  159.                       appropriate for the network's class.
  160.  
  161.                       The ----aaaa option can be repeated up to 50 times.  For each
  162.                       mask and match specified, the requesting client host's
  163.                       address is logically-ANDed with _m_a_s_k; if the result
  164.                       equals _m_a_t_c_h, the client's request is processed.  If
  165.                       none of the mask-match comparisons succeed, the request
  166.                       is rejected.  Requests from all of the local host's
  167.                       addresses are always permitted.
  168.  
  169.                       For example, if /_e_t_c/_c_o_n_f_i_g/_p_o_r_t_m_a_p._o_p_t_i_o_n_s contains
  170.  
  171.                            -a 255.255.255.0,128.32.199.0
  172.                            -a 192.0.2.0
  173.                            -a 255.255.255.255,192.26.51.3
  174.  
  175.                       access is restricted to any host on the Class B
  176.                       128.32.199 subnet or the Class C 192.0.2 network or to
  177.                       the host with the 192.26.51.3 address.  Requests from
  178.                       clients on any other networks are rejected.
  179.  
  180.      ----AAAA               This option is equivalent to a series of ----aaaa options
  181.                       listing all of the addresses of interfaces on the
  182.                       machine, with their netmasks.  It is convenient for
  183.                       authorizing hosts on directly connected networks and
  184.                       point-to-point links without explicitly enumerating the
  185.                       networks.  The restrictions defined by ----AAAA do not count
  186.                       against the limit of 50 ----aaaa options.
  187.  
  188.      ----NNNN               This option disable receiving network data on UDP port
  189.                       defined by 'syslog' in /etc/services ( or NIS ) or by
  190.                       the ----PPPP option below. However, sending data ( forwarding
  191.                       ) is still available and will *emit* from any UDP port.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ssssyyyyssssllllooooggggdddd((((1111MMMM))))                                                        ssssyyyyssssllllooooggggdddd((((1111MMMM))))
  203.  
  204.  
  205.  
  206.                       _N_O_T_E: When ----NNNN is _n_o_t active, syslog use the 'syslog'
  207.                       port /etc/services ( or NIS ) or by the ----PPPP option below.
  208.                       This port is used in _b_o_t_h directions, for receiving and
  209.                       sending data. This is in compliance of RFC3164.
  210.  
  211.      ----PPPP ppppoooorrrrtttt nnnnuuuummmmbbbbeeeerrrr   This option allows listening on UDP port different than
  212.                       the default ( 514 ).
  213.  
  214.      _s_y_s_l_o_g_d rereads its configuration file when it receives a hangup signal,
  215.      SIGHUP.  To bring _s_y_s_l_o_g_d down, send it a terminate signal (for example,
  216.      kkkkiiiillllllllaaaallllllll ----TTTTEEEERRRRMMMM ssssyyyyssssllllooooggggdddd).
  217.  
  218. SSSSEEEECCCCUUUURRRRIIIITTTTYYYY CCCCOOOONNNNSSSSIIIIDDDDEEEERRRRAAAATTTTIIIIOOOONNNNSSSS
  219.      _s_y_s_l_o_g_d creates log files in mode 644 which allows general read access.
  220.      If the log file already exists, its permissions are unchanged.  The
  221.      system administrator may wish to create separate log files with more
  222.      restricted permissions for sensitive information such as LOG_AUTH
  223.      messages.  Scripts or _c_r_o_n(1M) jobs that roll (that is save and restart
  224.      with a new file) these sensitive log files should ensure that the new log
  225.      file has the desired permissions.
  226.  
  227. FFFFIIIILLLLTTTTEEEERRRR EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  228.      This example shows how to use the filter mechanism.  To have _f_t_p_d(1M)
  229.      messages logged in a different file, add the following line to
  230.      /_e_t_c/_s_y_s_l_o_g._c_o_n_f:
  231.  
  232.           daemon,auth.debug       |/var/adm/ftpd.filt  /var/adm/ftpd.log
  233.  
  234.      The /_v_a_r/_a_d_m/_f_t_p_d._f_i_l_t file is a shell script:
  235.  
  236.           #!/bin/sh
  237.           # This filter only accepts ftpd messages
  238.           read line
  239.           set $line
  240.           case "$1" {
  241.               ftpd\[*)
  242.                   echo "$line\c"
  243.                   exit 0
  244.                   ;;
  245.           }
  246.           exit 0
  247.  
  248.  
  249. MMMMEEEESSSSSSSSAAAAGGGGEEEE EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  250.      The following is an example line from the /_v_a_r/_a_d_m/_S_Y_S_L_O_G file:
  251.  
  252.           Aug 10 10:32:53 6F:sgihost syslogd: restart
  253.  
  254.      Each line has several parts.  The date and time of the message are listed
  255.      first, followed by a priority and facility code.  Priorities are listed
  256.      as 0-7 and facilities are listed as A-T.  Reference <_s_y_s/_s_y_s_l_o_g._h>.  The
  257.      source is the name of the program that generated the message.  Following
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ssssyyyyssssllllooooggggdddd((((1111MMMM))))                                                        ssssyyyyssssllllooooggggdddd((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      the source is the message itself.
  273.  
  274. NNNNOOOOTTTTEEEESSSS
  275.      IP filtering options flags ( ----NNNN, ----PPPP, ----AAAA and ----aaaa ) were introduced in IRIX
  276.      6.5.15 and are not available in earlier releases.
  277.  
  278.  
  279. FFFFIIIILLLLEEEESSSS
  280.      /etc/syslog.conf              default configuration file
  281.      /dev/log                      device read by _s_y_s_l_o_g_d
  282.      /dev/klog                     the kernel log device
  283.      /usr/sbin/klogpp              filter for kernel messages
  284.      /etc/config/syslogd.options   command-line flags used at system startup
  285.  
  286. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  287.      logger(1), sysmon(1M), syslog(3C).
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.